<template>
  <div>
    <div class="top">
      <div class="nav">
        <div>全城<span class="iconfont icon-xiangxia1"></span></div>
        <div>品牌<span class="iconfont icon-xiangxia1"></span></div>
        <div>特色<span class="iconfont icon-xiangxia1"></span></div>
      </div>
    </div>
    <ul>
      <li v-for="item in cinemasObj" :key="item.id">
        <div class="con">
          <div class="title">
            {{ item.nm }}<span class="price">{{ item.sellPrice }}</span
            ><span>元起</span>
          </div>
          <div class="addr">{{ item.addr }}</div>
          <div class="biaoqian">
            <span v-show="item.tag.allowRefund == 1">退</span>
            <span v-show="item.tag.endorse == 1">改签</span>
            <span v-show="item.tag.snack == 1">小吃</span>
            <span v-show="item.tag.vipTag == '折扣卡'">折扣卡</span>
            <span v-show="item.tag.hallType == '杜比全景声厅'"
              >杜比全景声厅</span
            >
            <span v-show="item.tag.hallType == '4k厅'">4k厅</span>
            <span v-show="item.tag.hallType == '巨幕厅'">巨幕厅</span>
          </div>
          <div class="ka">
            <span class="ka1"
              ><img
                v-if="item.tag.vipTag == '折扣卡'"
                src="https://i.maoyan.com/images/dpmmweb/cinemaList/img/base/base64/card.png"
                alt=""
            /></span>
            <span class="ka2">{{ item.promotion.cardPromotionTag }}</span>
          </div>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
import axios from "axios";
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "Yingyuan",
  data() {
    return {
      cinemasObj: {},
    };
  },
  mounted() {
    axios.get("./json/cinemas.json").then((res) => {
      console.log(res);
      this.cinemasObj = res.data.cinemas.cinemas;
    });
  },
};
</script>

<style lang="less" scoped>
.top {
  width: 100%;
  height: 1.0667rem;
  z-index: 10;
  background-color: #fff;
  border-bottom: 1px solid #ccc;
}
.nav {
  display: flex;
  justify-content: space-around;
  text-align: center;
  align-items: center;
  line-height: 1.0667rem;
  position: fixed;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #ccc;
  div {
    border-right: 1px solid #ccc;
    width: 30%;
    font-size: 14px;
    color: #777;
    span {
      font-size: 12px;
      color: #ccc;
    }
  }
  div:nth-child(3) {
    border-right: none;
  }
}
li {
  width: 100%;
  height: 2.6667rem;
  border-bottom: 1px solid #ccc;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  line-height: 0.5333rem;
  div {
    margin: auto;
    margin-right: 0.8rem;
  }
}
li:last-child {
  border-bottom: none;
}
.title {
  font-size: 16px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  width: 8rem;
  span {
    color: #f03d37;
  }
  span:nth-child(2) {
    font-size: 12px;
  }
}
.biaoqian {
  span {
    border: 0.02rem solid #589daf;
    border-radius: 0.04rem;
    margin-left: 0.1333rem;
    color: #589daf;
    text-align: center;
  }
  span:nth-child(3) {
    border: 0.02rem solid #f90;
    border-radius: 0.04rem;
    color: #f90;
  }
  span:nth-child(4) {
    border: 0.02rem solid #f90;
    border-radius: 0.04rem;
    color: #f90;
  }
}
.addr {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  width: 8rem;
  font-size: 13px;
  color: #666;
}
.ka {
  display: flex;
  flex-wrap: wrap;
  color: #999;
}
.ka1 img {
  width: 0.4rem;
  height: 0.4rem;
  display: flex;
  align-items: center;
  margin-top: 0.0533rem;
}
</style>